package com.wanhu.player
{
	import flash.external.*;

	public class JSCall
	{
		public function call(func:String, ... arguments):*
		{
			if (ExternalInterface.available)
			{
				return ExternalInterface.call(func, arguments);
			}
			return "";
		}

		public function callBack(jsFunc:String, func:Function):void
		{
			if (ExternalInterface.available)
			{
				ExternalInterface.addCallback(jsFunc, func);
			}
		}
		
		public function getVar(key:String) : *
		{
			return this.call("getVar", key);
		}
	}
}
